home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 1 Issue 2 / PDCD-1 - Issue 02.iso / _utilities / utilities / 001 / _fsp / !Stasis / StasisHelp / Manual next >
Text File  |  1993-11-05  |  5KB  |  95 lines

  1. Stasis 0.41 Manual
  2. ==================
  3.  
  4.   Stasis is a module occupying about 11K which provides an easy to use sound system for games programmers.  Stasis plays samples, which it can load and save in various ways.  Sound commands are issued in the normal way.  There are facilities to retune samples to a different pitch if necessary.  Primitive pitch/volume slides are included.
  5.  
  6. Loading the Module
  7. ==================
  8.  
  9.   There are many ways - double clicking the application, *Run the application, *RMLoad Stasis:Stasis once the filer has seen the application, or whatever you can engineer for yourself.
  10.  
  11. Using Stasis
  12. ============
  13.  
  14.   The simplest (and probably the best) way to use Stasis is to load samples using the *StasisLoad command, choose which channel plays which sample with *StasisLink, and the play them with SOUND command (from BASIC) or Sound SWIs.
  15.  
  16. Loading Your Sounds
  17. ===================
  18.  
  19.   Stasis can load samples in either its native format (which will be extended in the future) or Tracker format (provided so that samples can be exchanged with other packages).  The command is *StasisLoad <slot> <filename>.  Stasis currently provides 64 slots, each of which can contain one sample.  The <slot> parameter is a decimal number 0-63.
  20.  
  21. Checking that Youæve Loaded Your Samples
  22. ========================================
  23.  
  24.   The command *StasisCat will list details of the first 16 sample slots.  *StasisCat 0 63 lists them all.
  25.  
  26. Playing your Samples
  27. ====================
  28.  
  29.   To get a sound from the module, you need to tell it which sample to play on which channel.  The command is *StasisLink <channel> <slot>.  The channel is the conventional 1-8 as used by the RISC OS sound system.  The slot should be the same number that you told *StasisLoad when you loaded your sample.  Note that you donæt need to attach channels (using *ChannelVoice etc) as Stasis claims the channel when you issue a *StasisLink command.
  30.  
  31.   If you need things to happen a bit more quickly, use the Stasis_Link SWI.  R0,R1 hold the parameters channel,slot.  The SWI doesnæt attach the voice - make sure you use a *StasisLink command at least once for each channel to do this.
  32.  
  33.   Once a sample is linked to a channel, it can be played using conventional sound commands.  The duration of the sound (the fourth number in a SOUND command) is ignored, and should be zero for future compatibility.
  34.  
  35. Examples
  36. ========
  37.  
  38.   If a Stasis sample is double clicked on the Desktop, it will be loaded into slot 1 and you should hear it.
  39.  
  40.   You can also try the following, using slot 2 as an example, from the command line (press F12):
  41.  
  42. *StasisLoad 2 <filename>
  43. *StasisLink 1 2
  44.  
  45.   and then press ctrl-G. Providing the file exists and the sound system is working, you should hear a sound.  If not, try the commands *Audio On, *Speaker On or *Volume 127 to see if that helps.
  46.  
  47. In BASIC, you could try:
  48.  
  49. *StasisLoad 1 <filename>
  50. *StasisLink 1 1
  51.  
  52. and whenever you need to make a sound
  53.  
  54. SOUND 1,-15,40,0  - for a pitch of 40.
  55.  
  56.   Entering the command *StasisCat should show whether you have loaded any samples.
  57.  
  58. Further Commands
  59. ================
  60.  
  61.   The above instructions should be all that you need to use sound in games etc.  If you are writing a program to produce samples then you may need to use the command *StasisSample.  *StasisSample <slot> <start address> <sample length> tells Stasis to use the block of memory at the specified address as data.  Whilst the slot is a decimal number, the other parameters are in hex.  A further two parameters may be added to specify a repeat offset (from the start of the sample) and repeat length.  This is how looped samples work - a section is repeated again and again.  See the technical file in this directory for more details.
  62.  
  63. Saving Samples
  64. ==============
  65.  
  66.   Samples must be saved individually, and may be saved in either of two formats.  The command StasisSave <slot> <filename> will save a sample in Stasis format.  The advantages are :
  67.  
  68.   Å The sample responds to double clicking on the desktop.
  69.   Å The finetune value is saved.
  70.   Å The file is a bit shorter.
  71.  
  72. The command StasisSave T <slot> <filename> saves the sample in Tracker format.  The advantages are :
  73.  
  74.   Å The sample can then be altered with other software packages.
  75.  
  76.   Both formats can be reloaded by Stasis.
  77.  
  78. Generally Messing About
  79. =======================
  80.  
  81.   Two more commands can be used to retune the sound system.  Firstly *StasisFineTune, which will retune a certain sample in a slot to a different pitch.  The finetune information is saved if the sample is saved in Stasis format.  The command *StasisTune sets the master tuning of the module, which affects all samples and is never saved.  The normal value for both is &4000.  Tuning values are hexadecimal.
  82.  
  83.   A sample can be renamed with *StasisName <slot> <name> where the name is up to 20 letters long.
  84.  
  85.   *StasisOverDrive On can be used at your own risk!
  86.  
  87. Condtions of Use
  88. ================
  89.  
  90.   This version of Stasis may be freely used and distributed for commercial or non-commercial applications.  If you can distribute the whole application with your software then so much the better, but otherwise just include whatever you need.  You must not remove my copyright notice from the module.
  91.   This software is supplied as is, and no liability will be accepted for loss or damage of any kind arising from its use or misuse.
  92.  
  93. Andy Southgate, 5th Nov 1993.
  94.  
  95.